CC = g++
PROJ = snake
FLG = -std=c++2a -Ofast
LIB = -lsfml-graphics -lsfml-window -lsfml-system 
OBJFS = build/game.o build/main.o build/snake.o

$(PROJ): $(OBJFS)
	$(CC) $(FLG) $(LIB) $(OBJFS) -o build/$(PROJ)
	build/$(PROJ)

build/game.o: src/game.cpp src/game.hpp
	$(CC) -c $(FLG) src/game.cpp -o build/game.o

build/main.o: src/main.cpp
	$(CC) -c $(FLG) src/main.cpp -o build/main.o
	 
build/snake.o: src/snake.cpp src/snake.hpp
	$(CC) -c $(FLG) src/snake.cpp -o build/snake.o
